package com.xbongbong.pro.statistic.help.strategy.field.method;

import com.xbongbong.pro.statistic.help.strategy.field.FieldAnalysisStrategy;
import com.xbongbong.pro.statistic.pojo.FieldAnalysisPojo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zhouwq
 * @date 2020/9/8 10:28
 */

public class DefaultFieldAnalysis implements FieldAnalysisStrategy {
    @Override
    public Map<String, String> doAnalysisField(FieldAnalysisPojo fieldAnalysisPojo) {
        List<String> values = fieldAnalysisPojo.getValues();
        List<String> valuesResult = fieldAnalysisPojo.getValuesResult();
        Map<String, String> results = new HashMap<>(1 << 4);
        for (int i = 0; i < values.size(); i++) {
            results.put(values.get(i), valuesResult.get(i));
        }
        return results;
    }
}
